package com.auto.entity;

import javax.persistence.Entity;
import javax.persistence.Transient;

import org.springframework.web.bind.annotation.RequestMethod;

@Entity
public class Request extends IdEntity {
	private String url;

	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public String getHeader() {
		return header;
	}

	public void setHeader(String header) {
		this.header = header;
	}

	private String type;

	private String body;

	private String header;

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Transient
	public boolean isPost() {
		return this.type.equals(RequestMethod.POST);
	}
}
